﻿
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Index.cshtml";
}
<h2>Index</h2>

<div class="topPanel">
    @Html.Partial("_OrganizeIdDDLToolbarSearchView")
    <div class="toolbar">
        <div class="btn-group">
            <a id="NF-add" authorize="yes" class="btn btn-primary" onclick="btn_add()"><i class="fa fa-plus"></i>新建</a>
        </div>
        <div class="btn-group">
            <a id="NF-edit" authorize="yes" class="btn btn-primary" onclick="btn_edit()"><i class="fa fa-pencil-square-o"></i>修改</a>
        </div>
   </div>
</div>

<script>
    function btn_add() {
        $.modalOpen({
            id: "Form",
            title: "新增demo",
            url: "/Demo/Form?orgId=" + $('#OrganizeId').val(),
            width: "700px",
            height: "600px",
            callBack: function (iframeId) {
                top.frames[iframeId].submitForm();
            }
        });
    }
</script>